<%-- 
    Document   : ManageLogin
    Created on : Mar 11, 2015, 11:27:18 AM
    Author     : trang_000
--%>

<%@page import="Models.User"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<%
    User staff = (User) session.getAttribute("user");

    if (staff != null) {
       // response.sendRedirect(request.getContextPath() + "/Administration/home");
    } else {
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="description" content="Staff Login Page">
        <title>Login Page - Online Dormitory System</title>
        <link href="<%= request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css"/>
        <s:head />
    </head>
    <body>
        <div class="headerbg">
            <%@include file="/include/mHeader.jsp" %>
        </div>
        <div class="contentbg">
            <div class="content">
                <div class="registerbg">
                    <div class="loginForm">
                        <h1>Administration - Login</h1>
                        <p><s:actionmessage /></p>
                        <s:form action="home" namespace="/Management">
                            <s:textfield name="loginName" label="Username" size="30" />
                            <s:password name="password" label="Password" size="30" />
                            <table>
                                <tr>
                                    <td>
                                        <s:reset value="Reset" cssStyle="width: 96px" theme="simple" />
                                    </td>
                                    <td>
                                        <s:submit value="Login" cssStyle="width: 96px; margin-left: 80px" theme="simple" />
                                    </td>
                                </tr>
                            </table>
                        </s:form>
                        <p><s:actionerror /></p>
                    </div>
                    <div class="registerLink">
                        <h1>You must login to access [Management Page]</h1>
                        <h1>Thanks!</h1>
                    </div>
                </div>
            </div>
        </div>
        <div class="footerbg">
            <%@include file="/include/iFooter.jsp" %>
        </div>
    </body>
</html>
<%
    }
%>
